home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 19 / CU Amiga Magazine's Super CD-ROM 19 (1998)(EMAP Images)(GB)[!][issue 1998-02].iso / CUCD / Online / Apache / apache_1.3b3.diffs.readme < prev    next >
Text File  |  1997-12-10  |  2KB  |  90 lines

  1. README for Apache_1.3b3.diffs
  2. =============================
  3.  
  4. * unarchive the apache_1.3b3.tar.gz archive to a directory of your choice
  5. * copy the apache_1.3b3.diffs file to the created apache_1.3b3 directory.
  6. * patch the sources by opening a shell and type:
  7.     patch -l -p1 -i apache_1.3b3.diffs
  8.  
  9. * use the latest patch from ftp.ninemoons.com!
  10. * if all went well you have an Amiga Apache source ready to compile
  11.  
  12. * It is possible that the src/main/util.c file is not patched correctly.
  13.   it happend to me, but Jeff Sheperd had no problems with it. So, it is
  14.   possible that it only happens with some configurations. Anyway,
  15.   if this happen to you, open an editor and load the src/main/util.c file.
  16.  
  17.   then search for this part at line 446:
  18.  
  19. ---------------------------- snip ---------------------------------
  20.  
  21. API_EXPORT(char *) make_dirstr(pool *p, const char *s, int n)
  22. {
  23.     register int x, f;
  24.     char *res;
  25.  
  26.     for (x = 0, f = 0; s[x]; x++) {
  27.     if (s[x] == '/')
  28.         if ((++f) == n) {
  29.         res = palloc(p, x + 2);
  30.         strncpy(res, s, x);
  31.         res[x] = '/';
  32.         res[x + 1] = '\0';
  33.         return res;
  34.         }
  35.     }
  36.  
  37.     if (s[strlen(s) - 1] == '/')
  38.     return pstrdup(p, s);
  39.     else
  40.     return pstrcat(p, s, "/", NULL);
  41. }
  42. ---------------------------- snap ---------------------------------
  43.  
  44. and replace it by:
  45.  
  46. ---------------------------- snip ---------------------------------
  47.  
  48. API_EXPORT(char *) make_dirstr(pool *p, const char *s, int n)
  49. {
  50.     register int x, f;
  51.     char *res;
  52.  
  53.     for (x = 0, f = 0; s[x]; x++) {
  54. #ifdef AMIGA /* Beware the dreaded ':' */
  55.      if (s[x] == '/' || (x && s[x-1] == ':'))
  56. #else
  57.     if (s[x] == '/')
  58. #endif
  59.         if ((++f) == n) {
  60.         res = palloc(p, x + 2);
  61.         strncpy(res, s, x);
  62. #ifdef AMIGA
  63.         if (res[x-1] == ':')
  64.            x--;
  65.         else
  66. #endif
  67.         res[x] = '/';
  68.         res[x + 1] = '\0';
  69.         return res;
  70.         }
  71.     }
  72.  
  73.     if (s[strlen(s) - 1] == '/')
  74.     return pstrdup(p, s);
  75.     else
  76.     return pstrcat(p, s, "/", NULL);
  77. }
  78.  
  79. ---------------------------- snap ---------------------------------
  80.  
  81. Save it, and type make! Do not use the util.c.orig, the other parts of it
  82. are patched correctly. If you experience the same or other problems compiling 
  83. the apache sources, please mail it to: apache@spinnewiel.xs4all.nl. Maybe
  84. there is something wrong with the patch program from the GG distributions.
  85.  
  86. yours sincerely,
  87.  
  88. Bert Vortman.
  89.  
  90.